#pragma once

class Vector3f
{
public:

	static const Vector3f zero;
	static const Vector3f x_axis;
	static const Vector3f y_axis;
	static const Vector3f z_axis;

	float x,y,z;

	Vector3f(void);
	Vector3f(float a, float b, float c);
	Vector3f(const Vector3f &other);

	~Vector3f(void);

	Vector3f& operator+=(const Vector3f &other);
	Vector3f operator+(const Vector3f &other) const;
	Vector3f& operator-=(const Vector3f &other);
	Vector3f operator-(const Vector3f &other) const;
	Vector3f& operator*=(const float &other);
	Vector3f operator*(const float &other) const;
	//float operator[](const unsigned int &dimension) const;

	Vector3f cross(const Vector3f &other) const;
	float dot(const Vector3f &other) const;
	void normalize();
	static Vector3f normalize(const Vector3f& v);
	float length() const;
	
	Vector3f& rotate(const Vector3f& origin, float radians);
	float cosA(const Vector3f& other) const;
	float angle(const Vector3f& other) const;

    //cast to pointer to float (eg for glTranslate3fv)
	operator float* () const {return (float*) this;}
	//operator const float* () const {return (const float*) this;}
};

